import type { Server } from "http";
import WS from "ws";
class WServer {
  private wss: WS.Server;
  constructor(httpServer: Server, path: string = "/ws") {
    this.wss = new WS.Server({
      server: httpServer,
      path,
    });

    // wss.on("connection", function connection(ws) {
    //   ws.on("message", function incoming(message) {
    //     console.log("received: %s", message);
    //   });

    //   ws.send("something");
    // });
  }

  getWss() {
    return this.wss;
  }
}
